// 虚拟滚动相关类型定义
export interface VirtualScrollItem {
  id: number | string;
  [key: string]: any;
}

export interface VirtualScrollProps {
  items: VirtualScrollItem[];
  itemHeight: number;
  containerHeight: number;
  buffer?: number; // 缓冲区大小
}

export interface VirtualScrollState {
  scrollTop: number;
  visibleStart: number;
  visibleEnd: number;
  totalHeight: number;
}

// 组件事件类型
export interface VirtualScrollEvents {
  scroll: (scrollTop: number) => void;
  itemClick: (item: VirtualScrollItem, index: number) => void;
}
